import { post, upload } from '../../utils/request';

interface UploadResponse {
  code: number;
  message: string;
  data: {
    page: any[];
    directoryId: string;
    fileName: string;
  };
}

/**
 * 文件上传接口
 * @param params 请求参数
 * @returns Promise<UploadResponse>
 */
export function uploadFile(params: FormData): Promise<UploadResponse> {
  return upload('/api/starhub/document/addDocumentInfo', params);
}